package com.atguigu.gmall.item.client;

import com.atguigu.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * @author tongatong
 * @name ItemFeignClient
 * @description
 * @date 2021/9/14
 * @time 16:34
 */
@FeignClient(value = "service-item")
@Repository
public interface ItemFeignClient {
    /**
     * 获取sku详情信息
     * @param skuId skuId
     * @return 返回值
     */
    @GetMapping("/api/item/{skuId}")
    Result<Map<String, Object>> getItem(@PathVariable("skuId") Long skuId);

}
